home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows News 2010 Summer - Disc 1
/
WN_Ete2010_CD1.iso
/
Onglet5
/
Weezo
/
Weezo setup.exe
/
{code_appDir}
/
www
/
local
/
genWebLink.php
< prev
next >
Wrap
PHP Script
|
2010-05-19
|
3KB
|
69 lines
<?php
/**
* Generate a link to put on a website *** not published ***
*
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category NA
* @package NA
* @author Nicolas Bruley / Peer 2 World <contact@weezo.net>
* @copyright 2005-2009 Nicolas Bruley / Peer 2 World
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id:$
* @link http://www.weezo.net
* @since File available since Release 1.0.*
*/
// Initialize script data
require_once('localFunctions.php');
require_once(INCLUDE_DIR.'applicationConfigFunctions.php');
lfInit();
// HEAD
cfInsertHEAD(false);
echo '<meta width="400x'.((isset($_Get ['user']))?'300':'350').'"></meta>';
echo '<meta wintitle="'.cfCaption('genSiteButton').'"></meta>';
if(!cfIsInApp()) echo cfScriptLink('winClient.js');
echo "</HEAD>\n";
echo '<body onload="genLink()">';
echo outDivFrame('frame1').'<div class="frame1Header">'.cfCaption('genSiteButton').'</div><br>';
// User
if(isset($_GET['user'])){
echo '<input id="includeGroup" type="checkbox" checked="checked" onchange="genLink()">'.cfCaption('genSiteButtonGroup').' ('.cfUTF8Encode($_GET['user']).')<br>';
}
else echo '<input id="includeGroup" style="display:none">';
// Password
if(isset($_GET['hasPassword'])){
echo outTableTransparent('frame1').'<tr><td>';
echo '<span style="white-space:nowrap;margin-right:2em;"><input id="includePassword" type="checkbox" onchange="genLink()">'.cfCaption('genSiteButtonPassword').cfCaption('genSeparator').'<input type="text" size="10" id="password" onkeyup="genLink()" onblur="genLink()">';
echo '</span></td><td>';
echo outImage(outIcon('alert'),false,false,'margin-right:1em;vertical-align:middle').'<span class="warning">'.cfCaption('alertWarningTitle').cfCaption('genSeparator').cfCaption('securityClearPwdWarning').'</span>';
echo '</td></tr></table>';
}
else echo '<input id="includePassword" style="display:none">';
// Link frame
echo outDivFrame('frame2');
?>
<textarea id="webLink" style="width:100%"></textarea>
</div>
<center><?php if(cfIsInApp()) echo outButton(cfCaption('genClose'),'javascript:wl.UICommand(\'close\')',outIcon('close'));?></center>
</div>
<script type="text/javascript">
function genLink(){
var userName="<?php echo $_GET['userName'];?>";
var user="<?php if(isset($_GET['user'])) echo $_GET['user'];?>";
dgi('webLink').value='<scr'+'ipt type="text/javascript" src="http://weezo.net/widget/webLink.php?userName='+userName+(dgi('includeGroup').checked?'&user='+user:'')+(dgi('includePassword').checked?'&password='+dgi('password').value:'')+'" id="weezoBt'+userName+'"></sc'+'ript>';
}
</script>